/*
 * Project Name:hbm-base.
 * File Name:CsSmOrderTypeController.java
 * Package Name:com.hginfo.cs.fe.eu.web.cs
 * Date:2018年04月24日 下午3:58:49
 * Copyright (c) 2016, hongguaninfo.com All Rights Reserved.
 *
 */
package cn.uce.cc.rest.control;

import cn.uce.cc.api.service.biz.ISmOrderTypeBiz;
import cn.uce.ics.base.vo.cs.CsSmOrderTypeVo;
import cn.uce.web.common.base.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
   * ics数据字典与相关接口字典接口
   * @Author liupan
   * @Description
   * @Date  2020-06-30 15:46
   */
@Controller
@RequestMapping("/cs/CsSmOrderType")
public class CcSmOrderTypeController extends BaseController{

    private Logger log = LoggerFactory.getLogger(CcSmOrderTypeController.class);
    @Resource
    private ISmOrderTypeBiz smOrderTypeBiz;

    @RequestMapping(value="/getCsSmOrderTypeList.do")
    @ResponseBody
    public List<CsSmOrderTypeVo> getChildCsOrderType(CsSmOrderTypeVo csSmOrderTypeVo){
        List<CsSmOrderTypeVo> list = smOrderTypeBiz.getCsOrderType(csSmOrderTypeVo);
        return list;
    }


    /**
     * 客户类型
     * @return
     */
    @RequestMapping(value="/getCustomerType.do")
    @ResponseBody
    public Map<String, Object> getCustomerType(){
        try {
              return returnSuccess(smOrderTypeBiz.getCustomerType());
        } catch (Exception e) {
            log.error("CcSmOrderTypeController,getCustomerType,Exception", e);
            returnError("查询客户信息失败");
        }
        return null;
    }


    /**
     * 工单-责任环节 wos_responsibility_link
     * @return
     */
    @RequestMapping("/getResponsibilityLink")
    @ResponseBody
    public Map<String, Object> getResponsibilityLink(){
        try {
            return returnSuccess( smOrderTypeBiz.getResponsibilityLink());
        } catch (Exception e) {
            log.error("CcSmOrderTypeController,getResponsibilityLink,Exception", e);
            returnError("查询客户信息失败");
        }
        return null;
    }


    /**
     * 工单-回电时效 wos_call_back_time_within
     * @return
     */
    @RequestMapping("/getReCallTime")
    @ResponseBody
    public Map<String, Object> getReCallTime(){
        try {
            return returnSuccess( smOrderTypeBiz.getReCallTime());
        } catch (Exception e) {
            log.error("CcSmOrderTypeController,getReCallTime,Exception", e);
            returnError("查询客户信息失败");
        }
        return null;
    }

    /**
     * 工单投诉大小类获取
     * @param parentId
     * @return
     */
    @RequestMapping("/queryComplaintTypeConf")
    @ResponseBody
    public Map<String, Object> queryComplaintTypeConf(Long parentId) {
        try {
            return returnSuccess(smOrderTypeBiz.queryComplaintTypeConf(parentId));
        } catch (Exception e) {
            log.error("CcSmOrderTypeController,queryComplaintTypeConf,Exception", e);
            returnError("查询客户信息失败");
        }
        return null;
    }



}
